import React, { Component } from 'react';
import Taro from '@tarojs/taro';
import {View} from '@tarojs/components'

export default class SellerApplyVip extends Component {
  UNSAFE_componentWillMount() {
    const params = Taro.getCurrentInstance().router.params
    let mpkey = ''
    const uInfo = Taro.getStorageSync('user') || ''
    if (uInfo && uInfo.mpkey && uInfo.mpkey !== 'undefined') {
      mpkey = uInfo.mpkey
    }
    if (Object.keys(params).length > 0) {
      let text = '?'
      for (const key in params) {
        text += `${key}=${params[key]}&`
      }
      Taro.redirectTo({url: 'main/my/member/interests' + text + '&mpkey=' + mpkey})
    } else {
      Taro.redirectTo({url: 'main/my/member/interests' + '?mpkey=' + mpkey})
    }
  }

  render() {
    return (
      <View />
    )
  }
}
